package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import cn.com.api.entity.ApiT_dingdan;

//DAO
public interface T_dingdanMapperBase {

	// 根据id查看
	@Select("SELECT * FROM t_dingdan  WHERE rid = #{rid}")
	public ApiT_dingdan findT_dingdanById(Integer rid);

	// 查看数据集
	@Select("SELECT * FROM T_dingdan")
	public List<ApiT_dingdan> findT_dingdans();

	// 添加
	@Insert("INSERT INTO t_dingdan (titles, shop_id, uid, peisong, name, tel, mobile, email, zip, address, dtime, bz, money, appuser, appdate, rip, enable, zi_status, dd_status, zf_type, remainmoney, serial, serialflagno, ordertype, paytime, sumgoodsprice, sendfee, takegoodstime, cancelreason, product_ids, car_ids) VALUES (#{titles}, #{shop_id}, #{uid}, #{peisong}, #{name}, #{tel}, #{mobile}, #{email}, #{zip}, #{address}, #{dtime}, #{bz}, #{money}, #{appuser}, #{appdate}, #{rip}, #{enable}, #{zi_status}, #{dd_status}, #{zf_type}, #{remainmoney}, #{serial}, #{serialflagno}, #{ordertype}, #{paytime}, #{sumgoodsprice}, #{sendfee}, #{takegoodstime}, #{cancelreason}, #{product_ids}, #{car_ids})")
	public int insertT_dingdan(ApiT_dingdan t_dingdan);

	// 修改
	@Update("UPDATE t_dingdan SET titles = #{titles}, shop_id = #{shop_id}, uid = #{uid}, peisong = #{peisong}, name = #{name}, tel = #{tel}, mobile = #{mobile}, email = #{email}, zip = #{zip}, address = #{address}, dtime = #{dtime}, bz = #{bz}, money = #{money}, appuser = #{appuser}, appdate = #{appdate}, rip = #{rip}, enable = #{enable}, zi_status = #{zi_status}, dd_status = #{dd_status}, zf_type = #{zf_type}, remainmoney = #{remainmoney}, serial = #{serial}, serialflagno = #{serialflagno}, ordertype = #{ordertype}, paytime = #{paytime}, sumgoodsprice = #{sumgoodsprice}, sendfee = #{sendfee}, takegoodstime = #{takegoodstime}, cancelreason = #{cancelreason}, product_ids = #{product_ids}, car_ids = #{car_ids} WHERE rid = #{rid}")
	public int updateT_dingdan(ApiT_dingdan t_dingdan);

	// 删除
	@Delete("DELETE FROM t_dingdan  WHERE rid = #{rid}")
	public int deleteT_dingdan(Integer rid);

}
